package com.sghd.fight.robot.action;

import com.sghd.common.socket.core.Message;
import com.sghd.fight.net.SocketEnum;
import com.sghd.fight.robot.core.Robot;

import java.util.HashMap;
import java.util.Map;

/**
 * @author frank
 * @date 2019-01-25 11:29
 * @desc
 **/
public class SkillAction extends AbstractAction {

    @Override
    public Stage stage() {
        return Stage.SKILL;
    }

    @Override
    public void action(Robot robot) {
        if (!check(robot)) {
            return;
        }
        Map<String, Object> body = new HashMap<>();
        body.put("skillId",1000);
        //执行技能
        robot.getClient().send(Message.valueOf(SocketEnum.EXECUTE_SKILL, body));
    }
}
